<%@ taglib prefix="uthink" uri="/WEB-INF/tld/shiros.tld"%>
<!DOCTYPE HTML>
<html>
<head>
	<meta charset="utf-8">
	<meta name="renderer" content="webkit|ie-comp|ie-stand">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport"
	content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
	<meta http-equiv="Cache-Control" content="no-siteapp" />
<!--[if lt IE 9]>
<script type="text/javascript" src="lib/html5.js"></script>
<script type="text/javascript" src="lib/respond.min.js"></script>
<script type="text/javascript" src="lib/PIE_IE678.js"></script>
<![endif]-->
<link href="css/H-ui.min.css" rel="stylesheet" type="text/css" />
<link href="css/H-ui.admin.css" rel="stylesheet" type="text/css" />
<link href="lib/icheck/icheck.css" rel="stylesheet" type="text/css" />
<link href="lib/Hui-iconfont/1.0.6/iconfont.css" rel="stylesheet" type="text/css" />
<link href="lib/webuploader/0.1.5/webuploader.css" rel="stylesheet" type="text/css" />
<!--[if IE 6]>
<script type="text/javascript" src="lib/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
<title></title>

</head>
<body>
	<div class="pd-20">
		<form id="dataform" class="form form-horizontal">
			<input type="hidden" name="id" id="entrepreneurid" value='${entrepreneurdetail.id}' />
			<div class="row cl">
				<label class="form-label col-xs-4 col-sm-3">基本信息</label>
			</div>
			<div class="row cl">
				<label class="form-label col-xs-4 col-sm-3">姓名：</label>
				<div class="formControls col-xs-8 col-sm-5">${entrepreneurdetail.user_name}</div>
			</div>
			<div class="row cl">
				<label class="form-label col-xs-4 col-sm-3">电话：</label>
				<div class="formControls col-xs-8 col-sm-5">${entrepreneurdetail.user_mobile}</div>
			</div>
			<div class="row cl">
				<label class="form-label col-xs-4 col-sm-3">推荐人：</label>
				<div class="formControls col-5">${entrepreneurdetail.referee_name}</div>
			</div>
			<div class="row cl">
				<label class="form-label col-xs-4 col-sm-3">推荐人ID：</label>
				<div class="formControls col-xs-8 col-sm-5">${entrepreneurdetail.referee_id}</div>
			</div>
			<div class="row cl">
				<label class="form-label col-xs-4 col-sm-3">公司全称：</label>
				<div class="formControls col-xs-8 col-sm-5">${entrepreneurdetail.corp_fname}</div>
			</div>
			<div class="row cl">
				<label class="form-label col-xs-4 col-sm-3">公司简称：</label>
				<div class="formControls col-xs-8 col-sm-5">${entrepreneurdetail.corp_sname}</div>
			</div>
			<div class="row cl">
				<label class="form-label col-xs-4 col-sm-3">公司logo：</label>
				<div class="formControls col-xs-8 col-sm-5">
					<div class="col-sm-2">
						<a id="filePicker_logo">上传logo<i class="iconfont icon-plus1"></i></a>	
						<a onclick="updatelogo()">提交</a>					
						<!-- 	<br/>尺寸：380px *380px<br/>格式：JPG			 -->			
					</div>
					<div id="fileList_logo" class="m-l-n uploader-list">
						<c:if test="${!empty entrepreneurdetail.logo_img}">
						<div class="file-item thumbnail upload-state-done">
							<img width="190" height="190" src="${entrepreneurdetail.logo_img}" />
						</div>
					</c:if>
				</div>

				<input type="hidden" class="form-control"
				value="${entrepreneurdetail.logo_img}" placeholder="" id="logo_img"
				name="logo_img">
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3">公司简介：</label>
			<div class="formControls col-xs-8 col-sm-5">
				${entrepreneurdetail.corp_brief}
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3">公司税号：</label>
			<div class="formControls col-xs-8 col-sm-5">${entrepreneurdetail.corp_tax}</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3">经营执照：</label>
			<div class="formControls col-xs-8 col-sm-5">
				<img width="100" height="100"
				src="${entrepreneurdetail.licence_img}" />
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3">经营范围：</label>
			<div class="formControls col-xs-8 col-sm-5">${entrepreneurdetail.scope}</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3">地址：</label>
			<div class="formControls col-xs-8 col-sm-5">${entrepreneurdetail.address}</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3">法人代表：</label>
			<div class="formControls col-xs-8 col-sm-5">${entrepreneurdetail.legal_person}</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3">身份证号：</label>
			<div class="formControls col-xs-8 col-sm-5">${entrepreneurdetail.identification}</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3">法人手机号：</label>
			<div class="formControls col-xs-8 col-sm-5">${entrepreneurdetail.legal_mobile}</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3">证件正面图片：</label>
			<div class="formControls col-xs-8 col-sm-5">
				<img width="100" height="100"
				src="${entrepreneurdetail.identification_front}" />
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3">证件背面图片：</label>
			<div class="formControls col-5">
				<img width="100" height="100"
				src="${entrepreneurdetail.identification_back}" />
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3">委托协议书：</label>
			<div class="formControls col-xs-8 col-sm-5">
				<c:forEach items="${fn:split(entrepreneurdetail.proxy_img, ';')}"
				var="img">
				<img width="100" height="100" src="${img}" />
			</c:forEach>
		</div>
	</div>
	<div class="row cl">
		<label class="form-label col-xs-4 col-sm-3">办公场地：</label>
		<div class="formControls col-xs-8 col-sm-5">
			<c:forEach
			items="${fn:split(entrepreneurdetail.corp_picture, ';')}"
			var="img">
			<img width="100" height="100" src="${img}" />
		</c:forEach>
	</div>
</div>
<div class="row cl">
	<label class="form-label col-xs-4 col-sm-3">申请时间：</label>
	<div class="formControls col-xs-8 col-sm-5">${entrepreneurdetail.apply_time}</div>
</div>

<div class="row cl">
	<label class="form-label col-xs-4 col-sm-3">审核状态：</label>
	<div class="formControls col-xs-8 col-sm-5">
		<c:choose>
		<c:when test="${entrepreneurdetail.status == 0}">
		待审核
	</c:when>
	<c:when test="${entrepreneurdetail.status == 1}">
	已通过
</c:when>
<c:when test="${entrepreneurdetail.status == 2}">
未通过
</c:when>
</c:choose>
</div>
</div>

<div class="row cl">
	<label class="form-label col-xs-4 col-sm-3">审核信息</label>
</div>

<c:choose>
<c:when test="${entrepreneurdetail.status == 0}">
<div class="row cl">
	<label class="form-label col-xs-4 col-sm-3">审核操作：</label>
	<div class="formControls col-xs-8 col-sm-5">
		<select name="status">
			<option value="1">通过</option>
			<option value="2">驳回</option>
		</select>
	</div>
</div>
<div class="row cl">
	<label class="form-label col-xs-4 col-sm-3">审核意见：</label>
	<div class="formControls col-xs-8 col-sm-5">
		<textarea class="textarea" placeholder="" name="reason"
		onkeyup="$.Huitextarealength(this,500)"></textarea>
	</div>
</div>

<div class="row cl">
	<div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-3">
		<a class="btn btn-warning" onclick="save()"
		href="javascript:void(0);" title="提交">提交</a>
	</div>
</div>
</c:when>
<c:otherwise>
<div class="row cl">
	<label class="form-label col-xs-4 col-sm-3">审核意见：</label>
	<div class="formControls col-xs-8 col-sm-5">
		<textarea class="textarea" placeholder="" readonly="readonly"
		name="reason">${entrepreneurdetail.reason}</textarea>
	</div>
</div>
<div class="row cl">
	<label class="form-label col-xs-4 col-sm-3">审核时间：</label>
	<div class="formControls col-xs-8 col-sm-5">${entrepreneurdetail.update_time}
	</div>
</div>
<div class="row cl">
	<label class="form-label col-xs-4 col-sm-3">审核人：</label>
	<div class="formControls col-xs-8 col-sm-5">${entrepreneurdetail.apply_uname}
	</div>
</div>
</c:otherwise>
</c:choose>

</form>
</div>
<script type="text/javascript" src="lib/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="lib/layer/2.1/layer.js"></script>
<script type="text/javascript" src="lib/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="lib/icheck/jquery.icheck.min.js"></script>
<script type="text/javascript" src="lib/Validform/5.3.2/Validform.min.js"></script>
<script type="text/javascript" src="lib/webuploader/0.1.5/webuploader.min.js"></script>
<script type="text/javascript" src="lib/ueditor/1.4.3/ueditor.config.js"></script>
<script type="text/javascript" src="lib/ueditor/1.4.3/ueditor.all.min.js"></script>
<script type="text/javascript" src="lib/ueditor/1.4.3/lang/zh-cn/zh-cn.js"></script>
<script type="text/javascript" src="js/H-ui.js"></script>
<script type="text/javascript" src="js/H-ui.admin.js"></script>
<script type="text/javascript">
	/****************初始化上传空间*************/
	var $list_logo = $('#fileList_logo'), 
	ratio = window.devicePixelRatio || 1, 
	thumbnailWidth = 100 * ratio, 
	thumbnailHeight = 100 * ratio, 
	uploader_logo;

	uploader_logo = WebUploader.create({
		auto: true,
		swf: 'lib/webuploader/0.1.5/Uploader.swf',
		server: '<%=path%>/backstage/common/uploadPic',
		pick: '#filePicker_logo',
		formData : {
			foldername : ''
		}
	});

	uploader_logo.on( 'fileQueued', function( file ) {

	});

	uploader_logo.on( 'uploadSuccess', function(file, response) {
		$("#logo_img").val(response.datas);
		var $li = $('<div id="' + file.id + '" class="file-item thumbnail"><img width="190" height="190" src="'+response.datas+'" /></div>');
		$list_logo.html($li);
	});

	uploader_logo.on( 'uploadError', function( file ) {
		// var $li = $( '#'+file.id ),
		// $error = $li.find('div.error');
		// if ( !$error.length ) {
		// 	$error = $('<div class="error"></div>').appendTo( $li );
		// }
		// $error.text('上传失败');
	});

	uploader_logo.on( 'uploadComplete', function( file ) {
		$( '#'+file.id ).find('.progress').remove();
	});

	//  验证大小
	uploader_logo.on("error",function (type){ 
		if(type == "F_DUPLICATE"){
			parent.layer.alert("系统提示", {
				icon : 2,
				skin : '请不要重复选择文件！'
			})
		}
	});

	function save() {
		$.ajax({
			type:"post",
			url: "<%=basePath%>backstage/validate_member_entrepreneur",
			data : $("#dataform").serialize(),
			success : function(msg) {
				var info = eval('(' + msg + ')');
				if (info.code == "0000") {
					window.parent.location.reload();
					var index = parent.layer.getFrameIndex(window.name);
					parent.layer.close(index);
				} else {
					alert("操作失败");
				}
			}
		})
	}

	function updatelogo(){
		$.ajax({
			type:"post",
			url: "<%=basePath%>backstage/updateentrepreneurlogo",
			data : "entrepreneurid="+$("#entrepreneurid").val()+"&logo_img="+$("#logo_img").val(),
			success : function(msg) {
				var info = eval('(' + msg + ')');
				if (info.code == "0000") {
					parent.layer.alert("操作成功", {
						icon : 1,
						skin : '修改成功'
					})
				} else {
					parent.layer.alert("系统提示", {
						icon : 2,
						skin : '操作失败'
					})
				}
			}
		})
	}
</script>
</body>
</html>

